package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TBusinessDept;
import com.party.business.mapper.TBusinessDeptMapper;
import com.party.business.service.ITBusinessDeptService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 业务部门Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-11
 */
@Service
public class TBusinessDeptServiceImpl extends ServiceImpl<TBusinessDeptMapper, TBusinessDept>  implements ITBusinessDeptService
{
    @Autowired
    private TBusinessDeptMapper tBusinessDeptMapper;

    /**
     * 查询业务部门
     *
     * @param id 业务部门主键
     * @return 业务部门
     */
    @Override
    public TBusinessDept selectTBusinessDeptById(String id)
    {
        return tBusinessDeptMapper.selectTBusinessDeptById(id);
    }

    /**
     * 查询业务部门列表
     *
     * @param tBusinessDept 业务部门
     * @return 业务部门
     */
    @Override
    public List<TBusinessDept> selectTBusinessDeptList(TBusinessDept tBusinessDept)
    {
        return tBusinessDeptMapper.selectTBusinessDeptList(tBusinessDept);
    }

    /**
     * 新增业务部门
     *
     * @param tBusinessDept 业务部门
     * @return 结果
     */
    @Override
    public int insertTBusinessDept(TBusinessDept tBusinessDept)
    {
                tBusinessDept.setCreateTime(DateUtils.getNowDate());
            return tBusinessDeptMapper.insertTBusinessDept(tBusinessDept);
    }

    /**
     * 修改业务部门
     *
     * @param tBusinessDept 业务部门
     * @return 结果
     */
    @Override
    public int updateTBusinessDept(TBusinessDept tBusinessDept)
    {
                tBusinessDept.setUpdateTime(DateUtils.getNowDate());
        return tBusinessDeptMapper.updateTBusinessDept(tBusinessDept);
    }

    /**
     * 批量删除业务部门
     *
     * @param ids 需要删除的业务部门主键
     * @return 结果
     */
    @Override
    public int deleteTBusinessDeptByIds(String[] ids)
    {
        return tBusinessDeptMapper.deleteTBusinessDeptByIds(ids);
    }

    /**
     * 删除业务部门信息
     *
     * @param id 业务部门主键
     * @return 结果
     */
    @Override
    public int deleteTBusinessDeptById(String id)
    {
        return tBusinessDeptMapper.deleteTBusinessDeptById(id);
    }
}
